<!--[pnajaxheader modname=crpCalendar filename=crpcalendar.js noscriptaculous=true nobehaviour=true]-->
<!--[include file="crpcalendar_admin_menu.htm"]-->
<!--[gt text="Calendar List" assign=templatetitle]-->
<div class="z-admincontainer">
    <div class="z-adminpageicon"><!--[pnimg modname='core' src='windowlist.gif' set='icons/large' alt=$templatetitle]--></div>
    <h2><!--[$templatetitle]--></h2>
    <!--[if $enablecategorization]-->
    <form class="z-form" action="<!--[pnmodurl modname=crpCalendar type=admin func=view]-->" method="post" enctype="application/x-www-form-urlencoded">
        <fieldset>
            <label for="events_category"><!--[gt text="Category"]--></label>
            <!--[selector_category category=$mainCategory name="events_category" selectedValue=$events_category defaultValue="0" __defaultText="All"]-->
            <label for="crpcalendar_event_status"><!--[gt text="Status"]--></label>
            <select id="crpcalendar_event_status" name="events_status">
                <option value=""<!--[if $events_status eq '']--> selected="selected"<!--[/if]-->><!--[gt text="Not specified"]--></option>
                <option value="A"<!--[if $events_status eq 'A']--> selected="selected"<!--[/if]-->><!--[gt text="Active"]--></option>
                <option value="P"<!--[if $events_status eq 'P']--> selected="selected"<!--[/if]-->><!--[gt text="Pending"]--></option>
                <option value="R"<!--[if $events_status eq 'R']--> selected="selected"<!--[/if]-->><!--[gt text="Rejected"]--></option>
            </select>
            <label for="crpcalendar_sortColumn"><!--[gt text="Order by"]--></label>
            <select id="crpcalendar_sortColumn" name="sortColumn">
                <option value="start_date"<!--[if $sortColumn eq 'start_date']--> selected="selected"<!--[/if]-->><!--[gt text="Start date"]--></option>
                <option value="title"<!--[if $sortColumn eq 'title']--> selected="selected"<!--[/if]-->><!--[gt text="Title"]--></option>
                <option value="end_date"<!--[if $sortColumn eq 'end_date']--> selected="selected"<!--[/if]-->><!--[gt text="End date"]--></option>
            </select>
            <label for="crpcalendar_sortOrder"><!--[gt text="Sorting"]--></label>
            <select id="crpcalendar_sortOrder" name="sortOrder">
                <option value="DESC"<!--[if $sortOrder eq 'DESC']--> selected="selected"<!--[/if]-->><!--[gt text="Descendant"]--></option>
                <option value="ASC"<!--[if $sortOrder eq 'ASC']--> selected="selected"<!--[/if]-->><!--[gt text="Ascendant"]--></option>
            </select>
            <input name="submit" type="submit" value="<!--[gt text="Submit"]-->" />
            <input name="clear" type="submit" value="<!--[gt text="Clear"]-->" />
        </fieldset>
    </form>
    <!--[/if]-->

    <table class="z-admintable">
        <thead>
            <tr>
                <th><!--[gt text="Title"]--></th>
                <th class="crpcalendar_w2"><!--[gt text="Internal ID"]--></th>
                <th class="crpcalendar_w2"><!--[gt text="by"]--></th>
                <!--[if $enablecategorization]-->
                <th class="crpcalendar_w3"><!--[gt text="Category"]--></th>
                <!--[/if]-->
                <th class="crpcalendar_w3"><!--[gt text="Start date"]--></th>
                <th class="crpcalendar_w3"><!--[gt text="End date"]--></th>
                <th class="crpcalendar_w1"><!--[gt text="Status"]--></th>
                <th class="crpcalendar_w2"><!--[gt text="Options"]--></th>
            </tr>
        </thead>
        <tbody>
            <!--[foreach from=$events item=event]-->
            <tr class="<!--[cycle values="z-odd,z-even"]-->">
                <td>
                    <span class="<!--[if $event.start_date > date("Y-m-d")]-->crpcalendar-upcoming<!--[/if]-->">
                        <!--[$event.title|pnvarprephtmldisplay]-->
                    </span>
                </td>
                <td><!--[$event.eventid|pnvarprephtmldisplay]--></td>
                <!--[if $event.cr_uid]-->
                <!--[pnusergetvar name=uname uid=$event.cr_uid assign=cr_profilename]-->
                <!--[else]-->
                <!--[pnmodgetvar module="Users" name="anonymous" assign=cr_profilename]-->
                <!--[/if]-->
                <td><!--[$cr_profilename]--></td>
                <!--[if $enablecategorization]-->
                <td>
                    <!--[$event.__CATEGORIES__.Main.display_name.$lang]-->
                </td>
                <!--[/if]-->
                <td><!--[$event.start_date|pndate_format:$complete_date_format]--></td>
                <td><!--[$event.end_date|pndate_format:$complete_date_format]--></td>
                <td>
                    <span class="crp-status-real"><!--[crpcalendarstatus status=$event.obj_status eventid=$event.eventid]--></span>
                    <span class="crp-status-fake z-hide"><!--[crpcalendarstatus status=$event.obj_status eventid=$event.eventid fake=true]--></span>
                    <!--[if $event.featured]--><!--[pnimg modname='core' set='icons/extrasmall' src='services.gif' __alt="Featured event" ]--><!--[/if]-->
                </td>
                <td>
                    <!--[assign var="options" value=$event.options]-->
                    <!--[section name=options loop=$options]-->
                    <a href="<!--[$options[options].url|pnvarprepfordisplay]-->"><!--[pnimg modname='core' set='icons/extrasmall' src=$options[options].image alt=$options[options].title title=$options[options].title]--></a>
                    <!--[/section]-->
                </td>
            </tr>
            <!--[foreachelse]-->
            <tr class="z-admintableempty"><td colspan="<!--[if $enablecategorization]-->8<!--[else]-->7<!--[/if]-->"><!--[gt text="No items found"]--></td></tr>
            <!--[/foreach]-->
        </tbody>
    </table>

    <script type="text/javascript">
        Event.observe(window, 'load', function(){crpCalendarAdminViewInit();}, false);
    </script>

    <!--[pager rowcount=$pager.numitems limit=$pager.itemsperpage posvar=startnum shift=1 img_prev=images/icons/extrasmall/previous.gif img_next=images/icons/extrasmall/next.gif]-->
</div>